package ooday01;

import java.security.SecureRandom;

public class Student {

        int age =0;
        String name =null;
        String stuId = null;
        String classname = null;
        //构造方法可以重载
        Student(){//无参构造

        }
    Student(int age, String name){//有参构造
        this.age=age;
        this.name=name;


    }
    Student(int age, String name, String stuid){//有参构造
        this.age=age;
        this.name=name;
        this.stuId=stuid;


    }
        Student(int age, String name, String stuid,String classname){//有参构造
            this.age=age;
            this.name=name;
            this.stuId=stuid;
            this.classname=classname;

        }




    void study(){
        System.out.println("正在学习。。。");
    }
    void sayHi(){
        System.out.println("大家好，我是"+this.name+"今年"+this.age+"岁，我的学号是"+this.stuId+"我的班级是"+this.classname);
            }
    void playwith(String anotrherName){
        System.out.println(this.name+"正在和"+anotrherName+"一起玩");
    }



}
